
package com.demo.aop.overview;

import com.demo.aop.overview.pojo.User;
import org.springframework.util.ReflectionUtils;

public class TargetFilterDemo {

    public static void main(String[] args) {

        ReflectionUtils.doWithFields(
                User.class,
                field -> {
                    System.out.println(field.getName());
                },
                field -> {
                    if ("age".equals(field.getName())) {
                        return false;
                    }
                    return true;
                });
    }

}
